package com.hippo.core.ui.components

import androidx.compose.foundation.layout.ColumnScope
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.tooling.preview.Preview
import com.hippo.core.ui.theme.HippoTheme

@Composable
fun CommonDialog(
    title:String,
    onDismissRequest: ()->Unit,
    content: @Composable ColumnScope.() -> Unit
) {

    BottomSheetDialog(
        title = title,
        onDismissRequest = onDismissRequest,
        skipPartiallyExpanded = false,
        content = content
    )

}


@Preview
@Composable
private fun CommonDialogPreview() {

    HippoTheme {
        CommonDialog(
            title = "标题",
            onDismissRequest = {}
        ){
            Text(text = "内容")
        }
    }

}